package com.itheima.demo02;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class MainFormat {
    public static void main(String[] args) throws ParseException {
        Date date = new Date();
        System.out.println(date);
        SimpleDateFormat sd = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        String format = sd.format(date);
        System.out.println(format);
        SimpleDateFormat sd1 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        Date date1 = sd1.parse(format);
        System.out.println(date1);
    }
}
